 package com.example.actordemo3.client;

import akka.actor.AbstractActor;

public class ClientDemo extends AbstractActor {

    @Override
    public void preStart() throws Exception {
        String s = getContext().self().path().toStringWithoutAddress();
        System.out.println(getSelf()+"---------开始"+s);
    }

    @Override
    public Receive createReceive() {
        return receiveBuilder().matchAny(o->{
            System.out.println(getSelf()+"---------"+o);
        }).build();
    }
}
